﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
using System.Xml.Xsl;
using System.Xml.XPath;

namespace CSharpLearningWeb
{
    public class Xslt
    {
        public Xslt()
        {

        }

        public void XsltCreate(string XmlDoc, string XsltDoc, string ResultFile)
        {
            try
            {
                XPathDocument xpath = new XPathDocument(XmlDoc);
                XslCompiledTransform xsltrans = new XslCompiledTransform();
                xsltrans.Load(XsltDoc);
                XmlTextWriter xmlwritter = new XmlTextWriter(ResultFile, null);
                xsltrans.Transform(xpath, null, xmlwritter);
                xmlwritter.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void XsltAdvanced()
        { }

    }
}